const request = require('../utils/request.js').request;
export function getUsersList() {
    return request('get', '/userDetails/getUserDetailsPublic')
}
export function getPageSettingList() {
    return request('get', '/pageSetting/getPageSettingPublic')
}
export function getUserDetailsList() {
    return request('get', '/userDetails/getUserDetailsAllPublic')
}
export function getUserDetailsByID(id) {
    return request('get', '/userDetails/getUserDetailsByIDPublic?ID=' + id,)
}
/*old APIs */
export function getSwiper() {
    return request('get', '/appCarousels')
}
export function getHotGoods() {
    return request('get', '/hotGoodList')
}
export function getNewGoods() {
    return request('get', '/newGoodList')
}
export function getCategories() {
    return request('get', '/getCategories')
}
export function getGoodList(data) {
    return request('get', '/commonGoodList', data)
}
export function getAppCategories() {
    return request('get', '/getAppCategories')
}
export function carouseGoodsList(data) {
    return request('get', '/carouseGoodsList', data)
}
export function getDetail(id) {
    return request('get', '/goods/detail/' + id,)
}
export function goodsForRec(id) {
    return request('get', '/goodsForRecharge/detail/' + id,)
}
export function login(data) {
    return request('post', '/adminPhone/loginApi', data)
}
export function getAddressList(data) {
    return request('get', '/address', data)
}
export function postAddress(data) {
    return request('post', '/addressAdd', data)
}
export function uploadAddress(data) {
    return request('post', '/addressUpdate', data)
}
export function getAddress(addressId) {
    return request('get', '/getAddress/' + addressId)
}
export function delAddress(addressId) {
    return request('get', '/addressRemove/' + addressId)
}
export function getPlaceLists(data) {
    return request('get', '/getPlaceList', data)
}
export function addCart(data) {
    return request('post', '/shop-cart', data)
}
export function uploadCart(data) {
    return request('post', '/updateShopCart', data)
}
export function getCart() {
    return request('get', '/shop-cart/page')
}
export function delCart(cartItemId) {
    return request('get', '/removeShopCart/' + cartItemId)
}
export function postOrder(data) {
    return request('post', '/saveOrder', data)
}
export function toPay(data) {
    return request('post', '/pay/doPay ', data)
}
export function getOrderInfo(orderNo) {
    return request('get', '/getOrderInfo/' + orderNo)
}
export function getOrderList(data) {
    return request('get', '/order', data)
}
export function getOrderDetail(orderNo) {
    return request('get', '/getOrderInfo/' + orderNo)
}
export function getRecharge(data, token) {
    return request('get', '/getRecharge', data, token)
}
export function getCouponlist(data) {
    return request('get', '/couponUser/list', data)
}
export function cancelOrder(orderNo) {
    return request('put', `/order/${orderNo}/cancel`)
}
export function finishOrder(orderNo) {
    return request('put', `/order/${orderNo}/finish`)
}
export function removeOrder(id) {
    return request('get', `/removeOrderById/${id}`)
}
export function getCoupon(data) {
    return request('get', `/couponUserRec`, data)
}
export function getCouponIndex(data) {
    return request('get', `/couponUserOnIndex/list`, data)
}
export function getCouponPay(orderNo) {
    return request('get', `/selectOrderCanUseCouponsByOrderNo/${orderNo}`)
}
export function getImgCash(data) {
    return request('get', `/getImgCash`, data)
}
export function getActUserInfo(data) {
    return request('get', `/getActUserInfo`, data)
}
export function getActRecharge(data) {
    return request('get', `/getActRecharge`, data)
}
export function getActRechargeInfo(data) {
    return request('get', `/getActRechargeInfo`, data)
}
export function ckGoods(goodsId) {
    return request('get', `/ckGoods/` + goodsId,)
}
export function getGoodsListByUser(data) {
    return request('get', `/getGoodsListByUser`, data)
}
export function getGoodsForRecList(data) {
    return request('get', `/getGoodsForRecList`, data)
}
export function toOrderRec(addressId, goodId, goodRec) {
    return request('get', `/toOrderRec/${addressId}/${goodId}/${goodRec}`)
}
export function addPet(data) {
    return request('post', '/petInfo/add', data)
}
export function getPetList(data) {
    return request('get', `/petInfo/list`, data)
}
export function toFeedBack(data) {
    return request('post', '/toFeedBack', data)
}
export function getPetInfo(id) {
    return request('get', `/petInfo/getById/${id}`)
}
export function updatePet(data) {
    return request('post', '/petInfo/update', data)
}
export function delPet(id) {
    return request('get', '/petInfo/delete/' + id)
}
export function search(data) {
    return request('get', '/search', data)
}
export function changePay(data) {
    return request('get', '/saveOrderBySuccess', data)
}
export function uploadInfo(data) {
    return request('put', '/user/info', data)
}
export function getUserRecharge(data) {
    return request('get', '/getUserInfoByRechargeInfo', data)
}
export function refOrderStatus(data) {
    return request('post', '/refOrderStatus', data)
}
export function payRecharge(data) {
    return request('post', '/pay/payRecharge', data)
}
export function getDeliRefOrderInfoOnApp(orderNo) {
    return request('get', '/getDeliRefOrderInfoOnApp/' + orderNo,)
}
export function refOrder(data) {
    return request('get', '/refOrder', data)
}
export function loginTest(data) {
    return request('post', '/base/OAuthToken', data)
}
export function register(data) {
    return request('post', '/base/RegisterOnWx', data)
}
export function createOrder(data) {
    return request('post', '/orders/createOrders', data)
}
export function getOrderLists(data) {
    return request('get', '/orders/getOrdersList', data)
}
export function createUser(data) {
    return request('post', '/userDetails/createUserDetails', data)
}
export function addReportInfor(data) {
    return request('post', '/reportInfor/createReportInfor', data)
}
export function addJoin(data) {
    return request('post', '/joinInfo/createJoinInfo', data)
}
export function getIndexDetail(data) {
    return request('get', '/pageSetting/FindPageSettingAndInfo', data)
}
export function getUserShare(data) {
    return request('get', '/userShareInfor/getUserShareInforPublic', data)
}
export function pay(data) {
    return request('post', '/orders/onPay', data)
}
export function getFindOrders(data) {
    return request('get', '/orders/findOrders', data)
}